package com.zhiyizhen.handheld.component.message.api;

import com.zhiyizhen.handheld.component.message.bean.MarkReadReq;
import com.zhiyizhen.handheld.component.message.bean.MessageListBean;
import com.zhiyizhen.handheld.net.response.ResponseData;

import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface IMessageService {


    /**
     * 消息列表
     */
    @GET("/web/clinic/notice/getNoticeList")
    Observable<ResponseData<MessageListBean>> getNoticeList(
            @Header("token") String token,
            @Header("clinicId") String clinicId,
            @Query("pageNo") int pageNo,
            @Query("pageSize") int pageSize
    );

    /**
     * 查询消息未读数
     * @param token
     * @param clinicId
     * @return
     */
    @GET("/web/clinic/notice/getUnreadNum")
    Observable<ResponseData<Integer>> getUnreadNum(
            @Header("token") String token,
            @Header("clinicId") String clinicId
    );

    /**
     * 标记已读
     */
    @POST("/web/clinic/notice/markRead")
    Observable<ResponseData<String>> markRead(@Header("token") String token, @Header("clinicId") String clinicId, @Body MarkReadReq markReadReq);

    /**
     * 标记删除
     */
    @POST("/web/clinic/notice/markDelete")
    Observable<ResponseData<String>> markDelete(@Header("token") String token, @Header("clinicId") String clinicId, @Body MarkReadReq markReadReq);
    /**
     * 标记删除
     */
    @POST("/web/clinic/notice/markAllRead")
    Observable<ResponseData<String>> markAllRead(@Header("token") String token, @Header("clinicId") String clinicId);


}
